/*******************************************************************************
 ** 
 ** This file is part of cmemtrac
 ** (C) 2011 Kevin Druelle 
 **
 ** Cmemtrac is free software: you can redistribute it and/or modify
 ** it under the terms of the GNU Lesser General Public License as published by
 ** the Free Software Foundation, either version 3 of the License, or
 ** (at your option) any later version.
 ** 
 ** Cmemtrac is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ** GNU General Public License for more details.
 ** 
 ** You should have received a copy of the GNU General Public License
 ** along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
 ** 
 ******************************************************************************/

#ifndef __CMT_NEW_H__
#define	__CMT_NEW_H__


#include <cstdlib>

extern const char * cmt_global_file;
extern const char * cmt_global_function;
extern unsigned long cmt_global_line;


void * operator new(size_t sAllocSize, const char * szFileName, const char * szFuncName, unsigned long ulLine);

void operator delete(void * ptr);

#define new new(__FILE__, __FUNCTION__, __LINE__)
#define delete cmt_global_file=__FILE__,cmt_global_function=__FUNCTION__,cmt_global_line=__LINE__,delete

#endif	/* __CMT_NEW_H__ */

